local RxFwViewImg = {
  vid = 'picVid'
}

function RxFwViewImg:show(wid, vid, picPath, locTable, alpha, radius)
  wid = wid or RxFwWnd.wid
  vid = vid or RxFwViewImg.vid
  RxFwViewImg.vid = vid
  if alpha == nil then
    alpha = 1
  end
  radius = radius or 0 -- 这个参数不能写，会崩溃
  -- RxLog('...RxFwViewImg:show locTable='..tostring(locTable))
  -- RxLog('...RxFwViewImg:show locTable[1]='..tostring(locTable[1]))

  if not picPath then
    RxLog('...RxFwViewImg:show picPath=nil')
    return nil
  end

  local x1 = locTable[1] or 0
  local y1 = locTable[2] or 0
  local x2 = locTable[3] or 1
  local y2 = locTable[4] or 1
  -- RxLog('...RxFwViewImg:show x1='..tostring(x1)..'-y1='..tostring(y1)..'-x2='..tostring(x2)..'-y2='..tostring(y2))

  fwShowImageView(wid, vid, picPath, x1, y1, x2, y2, {alpha=alpha, radius=radius})
  return wid, vid
end

function RxFwViewImg:close(wid, vid)
  fwCloseView(wid,vid)
end

return RxFwViewImg